<template>
    <p>初始的message:{{ message }}</p>
    <p>反转之后的message:{{ reservedMessage }}</p>
    <button @click="updateMessage">更改</button>
</template>
<script setup>
import {ref,computed} from 'vue'
const message = ref('Hello World!')
// const reservedMessage = computed(()=>{
// return message.value.split('').reverse().join('');
// })
const reservedMessage = computed(()=>
 message.value.split('').reverse().join('')
)
const updateMessage =()=>{
    message.value = 'hello'
}
</script>
